﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.VisualBasic;

using Kedrah;
using Kedrah.Constants;
using Kedrah.Modules;
using Kedrah.Objects;
using Kedrah.Util;

using Tibia;
using Tibia.Util;
using Tibia.Objects;
using Tibia.Constants;

namespace WindowsFormsApplication1
{
    public partial class elvenBot : Form
    {


        public elvenBot()
        {
            InitializeComponent();
        }


        private Tibia.Objects.Console console;
        Client c;
        Player p;
        dynamic NameOld;
        private void elvenBot_Load(object sender, EventArgs e)
        {
            c = ClientChooser.ShowBox();
            if (c == null || !c.LoggedIn)
            {
                MessageBox.Show("You must have at least one client open and logged in.");
                Application.Exit();
            }
            else
            {
                p = c.GetPlayer();
                this.Text = "Elven Bot - " + p.Name + " (" + p.WorldName + ")";
                c.Statusbar = "Elven Bot: Injected Successfully.";
                console = new Tibia.Objects.Console(c);
            }
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("You are sure? You want to quit?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                Application.Exit();
                this.Close();
            }
        }

        private void openMCToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Client.OpenMC();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tabSelect.SelectTab(tabBasics);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            tabSelect.SelectTab(tabHeal);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            tabSelect.SelectTab(tabMana);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            tabSelect.SelectTab(tabTrainer);
        }
    }
}
